<template>
  <div id="app">
    <Tab />
    <!-- 路由导航 -->
    <!-- <span :id="k==t?'ak':''" @click="go(v,k)" v-for="(v,k) in luyou" :key="k" style="margin-left:10px;cursor:pointer">{{v.title}}</span> -->
    <!-- <router-link :to="v.path" v-for="(v,k) in luyou" :key="k">{{v.title}}</router-link>     -->
    <!-- <router-link to="/dad">到dad页面</router-link>
    <router-link to="/home/666/888">到home页面</router-link>
    <router-link to="/">到根页面</router-link> -->
    <!-- <img src="./assets/logo.png"> -->
    <!--router-view 占位 渲染路径所对应的组件 一般在App.vue-->
    <router-view/>
    <!-- <Dad /> -->
  </div>
</template>

<script>
import Dad from "@/pages/Dad"
import Tab from "./pages/Tab.vue"
export default {
  name: 'App',
  data(){
      return{
        luyou:[
        {title:"到dad页面",path:"/dad",name:"dad"},
        {title:"到home页面",path:"/home",name:"home"},
        {title:"到根页面",path:"/",name:"HelloWorld"},
      ],
      t:0
      }
  },
  components:{Tab},
  methods:{
    go(v,k){
       console.log(v)
       this.t=k
      //  console.log(this.$router)// 所有的路由对象
      //  this.$router.push({path:v.path,params:{id:66}})// 路由重定向
      this.$router.push({name:v.name,params:{id:6666}})
    }
  }
}
</script>

<style>
*{
  margin: 0;
  padding: 0;
}
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
#ak{
  color:red
}
</style>
